#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

build: build-stamp

build-stamp:
	dh_testdir
	python setup.py build
	touch $@

clean: 
	dh_testdir
	dh_testroot

	python setup.py clean

	rm -f build-stamp

	rm -rf `find . -name '*~' -o -name '.#*' -o -name '*.orig' -o -name '*.rej' -o -name '*.py[co]'` sed-script
	rm -rf build
	#rm -rf pyarm.egg-info

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	#dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/pyarm.
	#python setup.py install --root $(CURDIR)/debian/pyarm --install-layout=deb
	python setup.py install --root $(CURDIR)/debian/pyarm
	#mv $(CURDIR)/debian/pyarm/usr/lib $(CURDIR)/debian/python-pyarm/usr
	#chmod 0755 $(CURDIR)/debian/pyarm/usr/bin/*
	#cp -p debian/desktop $(CURDIR)/debian/pyarm/usr/share/applications/pyarm.desktop

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installmenu
	dh_installman man/*
	#dh_installexamples
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_pysupport
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install
